const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  transpileDependencies: ['xlsx'],
  publicPath: '/dist/',
  chainWebpack: config => {
    config.module
      .rule('md')
      .test(/\.md$/)
      .use('raw-loader')
      .loader('raw-loader')
      .end()
  },
  devServer: {
    allowedHosts: 'all',
    host: '0.0.0.0',
    port: 8080,
    headers: {
      'Access-Control-Allow-Origin': '*'
    },
    historyApiFallback: {
      rewrites: [
        { from: /^\/.*$/, to: '/dist/index.html' }
      ]
    },
    webSocketServer: false
  }
})
